
import sys
import random

if (len(sys.argv) != 4):
    print ("Argumenty [ilosc_stanowisk] [ilosc_operacji] [ilosc_wariantow]")
    exit(1)

num_of_stations = sys.argv[1]
num_of_operations = sys.argv[2]
num_of_variants = sys.argv[3]

print (num_of_stations)
for operation_num in range(0,int(num_of_operations)):
    for variant_num in range(0,int(num_of_variants)):
        print(random.randint(1,20), end="")
        if variant_num != int(num_of_variants)-1:
                print(end=" ")
    print()
